// Do not remove the include below
#include "IRBasicRemote.h"

#include <IRremote.h>
#include "HardwareSerial.h"

extern HardwareSerial Serial;

int SEND_PIN = 11;
IRsend irsend;
unsigned long data[] = { 0x08F7, 0x8877, 0x48B7, 0xC837, 0x28D7, 0xA857, 0x6897,
		0xE817, 0x18E7, 0x9867 };
unsigned long mute = 0x906F;
unsigned long pre_data = 0x20DF;

void send(unsigned long cmd);
void setup() {
	Serial.begin(115200);
}

void loop() {
	send(mute);
	delay(1000);
}

void send(unsigned long cmd) {
	unsigned long msg = 0x00000000;
	msg |= pre_data;
	msg = msg << 16;
	msg |= cmd;
	irsend.sendNEC(msg, 32); // Sony TV power code
	delay(40);
}

